-- @owner: kyleze
-- @date: 2024-10-20
-- @testpoint: 自定义函数-类型bit(n)测试

--prestep1:切换B库;expect:执行成功
@conn PrimaryDbBmode;
show sql_compatibility;

--step1:创建函数  expect:成功
drop function if exists func_bit_0022;
create or replace function func_bit_0022(c1 bit(666)) returns bit(666)
as  $$
begin
     return c1;
end;
$$
language plpgsql;
/

--step2:调用函数  expect:成功
call func_bit_0022('00000000');
call func_bit_0022('');
call func_bit_0022('xdfaec'::bit);

--step3:清理环境 expect:成功
drop function  func_bit_0022;
